package com.stlm2.dems.dao.impl;

import com.stlm2.core.common.page.PageView;
import org.springframework.stereotype.Repository;

import com.stlm2.dems.entity.DdmGoods;
import com.stlm2.dems.dao.DdmGoodsDao;
import com.stlm2.core.base.impl.BaseDaoImpl;

import java.util.HashMap;
import java.util.Map;

@Repository("ddmGoodsDao")
public class DdmGoodsDaoImpl extends BaseDaoImpl<DdmGoods> implements DdmGoodsDao {
    @Override
    public PageView getByPropertyLabel(int pageNo, int pageSize, String label) {
        Map<String,Object> map  = new HashMap<String, Object>();
        map.put("label",label);
        return  queryPageView(pageNo,pageSize,"getByPropertyLabel",map);
    }

    @Override
    public DdmGoods getByCode(String code) {
        return selectOne("getByCode",code);
    }
}